using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Microformats.Entities;

namespace MicroformatUnitTests
{
    [TestFixture]
    public class MicroformatTests
    {
        [Test]
        public void MicroformatConstructor()
        {
            Microformat m = new Microformat();
            Assert.IsNotNull(m);
        }

        [Test]
        public void MicroformatType()
        {
            string name = "relTag";
            Microformat m = new Microformat();
            m.Name = name;
            Assert.AreEqual(name, m.Name);
        }

        [Test]
        [ExpectedException(typeof(ArgumentException), ExpectedMessage = "Type is not allowed to be blank")]
        public void MicroformatTypeNotEmpty()
        {
            string name = String.Empty;
            Microformat m = new Microformat();
            m.Name = name;
        }

        [Test]
        public void MicroformatHumanValue()
        {
            string humanValue = "HumanValue1";
            Microformat m = new Microformat();
            m.HumanValue = humanValue;
            Assert.AreEqual(humanValue, m.HumanValue);
        }

        [Test]
        public void MicroformatMachineValue()
        {
            string machineValue = "MachineValue1";
            Microformat m = new Microformat();
            m.MachineValue = machineValue;
            Assert.AreEqual(machineValue, m.MachineValue);
        }

        [Test]
        public void MicroformatEmptyFields()
        {
            Microformat m = new Microformat();            
            Assert.IsEmpty(m.Fields);
        }     
    }
}
